package com.zsl.blog.api.controller;

import com.zsl.blog.api.service.RegisterService;
import com.zsl.blog.api.vo.Result;
import com.zsl.blog.api.vo.params.RegisterParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
*@Description:注册
* @param null
*@Return:
*@Data:2022/11/20 18:16
*@Author:zhaosilong
*/
@RestController
@RequestMapping("/register")
@Api(tags = "注册")
public class RegisterController {
    @Autowired(required = false)
    private RegisterService registerService;
    @PostMapping
    @ApiOperation("注册")
    public Result register(@RequestBody @Validated RegisterParam param){
        return registerService.register(param);
    }
}
